/*
 * King.cpp
 *
 *  Created on: Mar 6, 2011
 *      Author: Michael Ziminsky
 */

#include "King.h"

namespace model
{
	namespace piece
	{
		King::King(bool light) : ChessPiece(light) {}

		globals::moveSet King::getPotentialMoves(const ChessBoard& b) const
		{
			globals::moveSet moves(new globals::moveSet::element_type);
			if (currLoc)
                for (int d = LEFT; d <= LEFTDOWN; d++)
					cellCheck(b, getOffsetLocation(static_cast<Direction>(d), *currLoc, 1), moves);
			return moves;
		}
	} // namespace pieces
} // namespace model
